0 CpxTRS
↳1 DependencyGraphProof (BOTH BOUNDS(ID, ID), 5 ms)
↳2 CpxTRS
↳3 TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID), 0 ms)
↳4 CpxWeightedTrs
↳5 TypeInferenceProof (BOTH BOUNDS(ID, ID), 0 ms)
↳6 CpxTypedWeightedTrs
↳7 CompletionProof (UPPER BOUND(ID), 0 ms)
↳8 CpxTypedWeightedCompleteTrs
↳9 CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID), 0 ms)
↳10 CpxRNTS
↳11 CompleteCoflocoProof (⇔, 71 ms)
↳12 BOUNDS(1, 1)
a(c(d(x))) → c(x)
u(b(d(d(x)))) → b(x)
v(a(a(x))) → u(v(x))
v(a(c(x))) → u(b(d(x)))
v(c(x)) → b(x)
w(a(a(x))) → u(w(x))
w(a(c(x))) → u(b(d(x)))
w(c(x)) → b(x)
v(c(x)) → b(x)
a(c(d(x))) → c(x)
u(b(d(d(x)))) → b(x)
w(c(x)) → b(x)
v(c(x)) → b(x) [1]
a(c(d(x))) → c(x) [1]
u(b(d(d(x)))) → b(x) [1]
w(c(x)) → b(x) [1]
v(c(x)) → b(x) [1]
a(c(d(x))) → c(x) [1]
u(b(d(d(x)))) → b(x) [1]
w(c(x)) → b(x) [1]
v :: c → b c :: d → c b :: d → b a :: c → c d :: d → d u :: b → b w :: c → b |
v(v0) → null_v [0]
a(v0) → null_a [0]
u(v0) → null_u [0]
w(v0) → null_w [0]
null_v, null_a, null_u, null_w, const
Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules:
The TRS has the following type information:
Rewrite Strategy: INNERMOST |
null_v => 0
null_a => 0
null_u => 0
null_w => 0
const => 0
a(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
a(z) -{ 1 }→ 1 + x :|: x >= 0, z = 1 + (1 + x)
u(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
u(z) -{ 1 }→ 1 + x :|: z = 1 + (1 + (1 + x)), x >= 0
v(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
v(z) -{ 1 }→ 1 + x :|: x >= 0, z = 1 + x
w(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
w(z) -{ 1 }→ 1 + x :|: x >= 0, z = 1 + x
eq(start(V),0,[v(V, Out)],[V >= 0]). eq(start(V),0,[a(V, Out)],[V >= 0]). eq(start(V),0,[u(V, Out)],[V >= 0]). eq(start(V),0,[w(V, Out)],[V >= 0]). eq(v(V, Out),1,[],[Out = 1 + V1,V1 >= 0,V = 1 + V1]). eq(a(V, Out),1,[],[Out = 1 + V2,V2 >= 0,V = 2 + V2]). eq(u(V, Out),1,[],[Out = 1 + V3,V = 3 + V3,V3 >= 0]). eq(w(V, Out),1,[],[Out = 1 + V4,V4 >= 0,V = 1 + V4]). eq(v(V, Out),0,[],[Out = 0,V5 >= 0,V = V5]). eq(a(V, Out),0,[],[Out = 0,V6 >= 0,V = V6]). eq(u(V, Out),0,[],[Out = 0,V7 >= 0,V = V7]). eq(w(V, Out),0,[],[Out = 0,V8 >= 0,V = V8]). input_output_vars(v(V,Out),[V],[Out]). input_output_vars(a(V,Out),[V],[Out]). input_output_vars(u(V,Out),[V],[Out]). input_output_vars(w(V,Out),[V],[Out]). |
CoFloCo proof output:
Preprocessing Cost Relations
=====================================
#### Computed strongly connected components
0. non_recursive : [a/2]
1. non_recursive : [u/2]
2. non_recursive : [v/2]
3. non_recursive : [w/2]
4. non_recursive : [start/1]
#### Obtained direct recursion through partial evaluation
0. SCC is partially evaluated into a/2
1. SCC is partially evaluated into u/2
2. SCC is partially evaluated into v/2
3. SCC is partially evaluated into w/2
4. SCC is partially evaluated into start/1
Control-Flow Refinement of Cost Relations
=====================================
### Specialization of cost equations a/2
* CE 8 is refined into CE [14]
* CE 9 is refined into CE [15]
### Cost equations --> "Loop" of a/2
* CEs [14] --> Loop 10
* CEs [15] --> Loop 11
### Ranking functions of CR a(V,Out)
#### Partial ranking functions of CR a(V,Out)
### Specialization of cost equations u/2
* CE 10 is refined into CE [16]
* CE 11 is refined into CE [17]
### Cost equations --> "Loop" of u/2
* CEs [16] --> Loop 12
* CEs [17] --> Loop 13
### Ranking functions of CR u(V,Out)
#### Partial ranking functions of CR u(V,Out)
### Specialization of cost equations v/2
* CE 6 is refined into CE [18]
* CE 7 is refined into CE [19]
### Cost equations --> "Loop" of v/2
* CEs [18] --> Loop 14
* CEs [19] --> Loop 15
### Ranking functions of CR v(V,Out)
#### Partial ranking functions of CR v(V,Out)
### Specialization of cost equations w/2
* CE 12 is refined into CE [20]
* CE 13 is refined into CE [21]
### Cost equations --> "Loop" of w/2
* CEs [20] --> Loop 16
* CEs [21] --> Loop 17
### Ranking functions of CR w(V,Out)
#### Partial ranking functions of CR w(V,Out)
### Specialization of cost equations start/1
* CE 2 is refined into CE [22,23]
* CE 3 is refined into CE [24,25]
* CE 4 is refined into CE [26,27]
* CE 5 is refined into CE [28,29]
### Cost equations --> "Loop" of start/1
* CEs [22,23,24,25,26,27,28,29] --> Loop 18
### Ranking functions of CR start(V)
#### Partial ranking functions of CR start(V)
Computing Bounds
=====================================
#### Cost of chains of a(V,Out):
* Chain [11]: 0
with precondition: [Out=0,V>=0]
* Chain [10]: 1
with precondition: [V=Out+1,V>=2]
#### Cost of chains of u(V,Out):
* Chain [13]: 0
with precondition: [Out=0,V>=0]
* Chain [12]: 1
with precondition: [V=Out+2,V>=3]
#### Cost of chains of v(V,Out):
* Chain [15]: 0
with precondition: [Out=0,V>=0]
* Chain [14]: 1
with precondition: [V=Out,V>=1]
#### Cost of chains of w(V,Out):
* Chain [17]: 0
with precondition: [Out=0,V>=0]
* Chain [16]: 1
with precondition: [V=Out,V>=1]
#### Cost of chains of start(V):
* Chain [18]: 1
with precondition: [V>=0]
Closed-form bounds of start(V):
-------------------------------------
* Chain [18] with precondition: [V>=0]
- Upper bound: 1
- Complexity: constant
### Maximum cost of start(V): 1
Asymptotic class: constant
* Total analysis performed in 58 ms.